<?php
/**
 * Created by PhpStorm.
 * User: zhangrxiang
 * Date: 2017/7/13
 * Time: 16:43
 * Project name: PHPTEST
 * File name: 3.php
 * @copyright Copyright (c) 2016 ZRX Software LLC
 * @license https://github.com/zhangrxiang
 * @since 1.0.0
 */

if ( isset( $_POST['member'] ) ) {
	$email = $_POST['member']['emailNumber'];
	if ( ! Yii::app()->user->isGuest ) {
		$this->redirect( 'setpwd' );
	}
	if ( $registerService->isMember( RegisterService::EMAIL, $email ) ) {
		//用户忘记密码登陆
		if ( isset( $_GET['status'] ) ) {
			Yii::app()->session['email']       = $email;
			Yii::app()->session['statuslogin'] = $_GET['statuslogin'];
			$this->redirect( 'setpwd' );
		}
		Yii::app()->user->setFlash( 'telVerify', '邮箱已被注册！' );
		$this->layout = 'member';
		$this->render( 'register' );
		exit;
	}

	Yii::app()->session['email'] = $email;
	$this->redirect( array( 'setpwd' ) );
}
$this->render( 'register_email' );